package com.xiukelai.springboot.base;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @description: 所有数据模型类的基类
 * @Author: lixueju
 * @Date: 2019/3/12 18:50
 */
public class BaseModel implements Serializable {
//    @ApiModelProperty(value = "tree属性")
//    @TableField(exist=false)
//    private List<?> list;

    @TableField(exist=false)
    private JSONObject extend;

    public JSONObject getExtend() {
        if(extend==null){
            this.extend=new JSONObject();
        }
        return extend;
    }

    @TableField(exist=false)
    private Map<String,Object> filter = new HashMap<String,Object>();
    public void addFilter(String key ,Object value){
        filter.put(key, value);
    }

    public Map<String,Object> getFilter() {
        return filter;
    }
    public void setFilter(Map<String,Object> filter) {
        this.filter = filter;
    }

}
